import service from "./request.js";

export default {
  // 修改经销商
  update(query) {
    return service({
      method: "PUT",
      url: "/admin-api/system/dealer/update",
      data: query,
    });
  },
  // 切换经销商状态
  status(query) {
    return service({
      method: "PUT",
      url: "/admin-api/system/dealer/reversal-status",
      data: query,
    });
  },
  // 创建经销商
  create(query) {
    return service({
      method: "POST",
      url: "/admin-api/system/dealer/create",
      data: query,
    });
  },
  // 获得经销商分页列表
  page(query) {
    return service({
      method: "GET",
      url: "/admin-api/system/dealer/page",
      params: query,
    });
  },
  // 获取经销商精简信息列表
  listAll(query) {
    return service({
      method: "GET",
      url: "/admin-api/system/dealer/list-all",
      params: query,
    });
  },
  // 获取经销商信息
  get(query) {
    return service({
      method: "GET",
      url: "/admin-api/system/dealer/get",
      params: query,
    });
  },
};
